
package com.legrand.www.module.common.util;

/**
 * @author xiah
 * @date 2018/4/26 18:00
 */
public class PageUtil {
    private static final Integer PAGE_SIZE = 10;
    private static final Integer PAGE_NUM = 1;

    public static Integer pageSizeCheck(Integer pageSize) {
        if (pageSize == null || pageSize <= 0) {
            return PAGE_SIZE;
        } else {
            return pageSize;
        }
    }

    public static Integer pageNumCheck(Integer pageNum) {
        if (pageNum == null || pageNum <= 0) {
            return PAGE_NUM;
        } else {
            return pageNum;
        }
    }
}
